package com.github.byakkili.bim.demo.interceptor;

import com.github.byakkili.bim.core.BimSession;
import com.github.byakkili.bim.core.handler.command.CommandFrame;
import com.github.byakkili.bim.core.interceptor.CommandInterceptor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author Guannian Li
 */
@Slf4j
@Component
public class MyCommandInterceptor implements CommandInterceptor {
    @Override
    public boolean preHandle(CommandFrame reqFrame, BimSession session) {
        return true;
    }

    @Override
    public void postHandle(CommandFrame reqFrame, CommandFrame respFrame, BimSession session) {

    }

    @Override
    public void afterCompletion(CommandFrame reqFrame, BimSession session, RuntimeException e) {

    }
}
